Blog Post

Apps on Azure Blog
2 MIN READ

Host Remote MCP Servers in Azure App Service

jordanselig's avatar
jordanselig
Icon for Microsoft rankMicrosoft
Apr 17, 2025

There has been a lot of buzz and examples around MCP (Model Context Protocol) recently. At Azure App Service, we want you to know that hosting your MCP servers in a web app is entirely possible.

My colleague, Anthony Chu, from Azure Container Apps, recently published an excellent blog post outlining how to get started with MCP servers in Azure Container Apps. I highly recommend reading it, as there are many similarities between hosting MCP servers on Azure Container Apps and Azure App Service. He also provides great background information on remote MCP servers and their future plans. In this article, I will build on that foundation and show you how to run remote MCP servers as web apps in Azure App Service, and how to connect to them with GitHub Copilot in Visual Studio Code.

Quick Background on MCP Servers

MCP (Model Context Protocol) servers are part of a rapidly evolving technology used for hosting and managing model-based contexts. These servers interact with clients like GitHub Copilot in VS Code, offering advanced features and enriching the functionality of large language models (LLMs). While most MCP servers are run locally, remote MCP servers are gaining traction. This is where cloud services like Azure App Service, Azure Functions, and Azure Container Apps come into play, providing developers with scalability and flexibility.

Building a Remote MCP Server on Azure App Service

We’ve released an official Azure Sample for hosting a remote MCP server on Azure App Service: remote-mcp-webapp-dotnet.

Follow the README file for step-by-step instructions on deploying the server locally and then to Azure App Service. The sample also guides users on connecting to the MCP server from VS Code. Additional language-specific samples will be released in the coming weeks. For more information on using MCP servers in VS Code, check out the VS Code docs.

This sample includes pre-built tools, such as the weather MCP server from Anthropic’s official quickstart, which has been adapted for deployment on Azure App Service with support for an /sse endpoint. Additionally, the sample features an azd template, enabling the entire solution to be deployed to Azure App Service with just a few CLI commands. We encourage you to expand upon this sample by adding more tools and customization.

Published Apr 17, 2025
Version 1.0
No CommentsBe the first to comment